package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.Constant;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by fuyi on 2017/10/25.
 */

public class ClickAmountApi extends BaseApi {
    ClickAmountReq req;
    public ClickAmountApi(String video_id){
        req=new ClickAmountReq(video_id);
    }
    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).getClickAmountt(requestBody);
    }
    private class ClickAmountReq{
        private String video_id;

        public ClickAmountReq(String video_id) {
            super();
            this.video_id = video_id;
        }
    }
}
